Skip to content

Let auto splitters hand in the Unity runtime module (#174) - #196

Open
ero-qt wants to merge 8 commits into
LiveSplit:masterfrom
ero-qt:issue-174/module
Open

ero-qt wants to merge 8 commits into
LiveSplit:masterfrom
ero-qt:issue-174/module

Conversation

@ero-qt

@ero-qt ero-qt commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Part of #174.

The scene manager, Mono and IL2CPP can now attach to a module the auto splitter finds itself. Each has attach_to_module(process, module, profile) and wait_attach_to_module, which take the module's address like Unreal's attach and Godot's locate do. This covers a renamed runtime file and a game with the engine in its executable, and none of it needs alloc.

let module = process.get_module_address("Game.exe").ok()?;
let manager =
    SceneManager::attach_to_module(&process, module, profiles::UNITY_5_6_2F1_WINDOWS_X86_64)?;
  • The format and size come from the module's header. A PE image takes its size of image and an ELF image runs to the end of its last load segment, the range GameAssembly.so already gets for its globals in .bss.
  • Mono trusts the profile's library instead of guessing it from the file name.
  • Mach-O isn't supported here, since asr has no reader for a Mach-O image's size yet.

cargo test --all-features and cargo test --no-default-features --features unity. The new tests attach each module under a file name attach doesn't know and read PE and ELF sizes from headers. I also ran all 93 Linux and Windows fixture players on it.


Depends on #195.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant